<template>
	<view class="padding-30">
		<view class="padding-30 border-radius20 bg-fff margin-bottom30">
			<view class="fontSize-15 color-000 margin-bottom30">请选择用药方式</view>
			<view class="flex-alignItems-center">
				<view class="flex-alignItems-center margin-right20" @click="chooseUseMedication('口服')">
					<view class="margin-right20">
						<image class="img-44" v-if="koufu == '口服'" src="../../../../static/image/checked.png" mode=""></image>
						<image class="img-44" v-else src="../../../../static/image/check.png" mode=""></image>
					</view>
					<view class="fontSize-15 color-000">口服</view>
				</view>
				<view class="flex-alignItems-center" @click="chooseUseMedication('外用')">
					<view class="margin-right20">
						<image class="img-44" v-if="koufu == '外用'" src="../../../../static/image/checked.png" mode=""></image>
						<image class="img-44" v-else src="../../../../static/image/check.png" mode=""></image>
					</view>
					<view class="fontSize-15 color-000">外用</view>
				</view>
			</view>
		</view>
		
		<view class="padding-30 border-radius20 bg-fff margin-bottom30">
			<view class="fontSize-15 color-000 margin-bottom30">每次用量</view>
			<view class="flex-between padding-bottom30 f-divider1 margin-bottom30">
				<view class="fontSize-15 color-000 margin-right20">用量单位</view>
				<input type="text" v-model="yongliangdanwei" placeholder="请输入" class="input-item"/>
			</view>
			<view class="flex-between padding-bottom30 f-divider1 margin-bottom30">
				<view class="fontSize-15 color-000 margin-right20">药品用量</view>
				<input type="text" v-model="yaopinyongliang" placeholder="请输入" class="input-item"/>
			</view>
		</view>
		
		<view class="padding-30 border-radius20 bg-fff">
			<view class="fontSize-15 color-000 margin-bottom30">药品类型</view>
			<view class="flex-alignItems-center">
				<view class="flex-alignItems-center margin-right20" @click="chooseYaoPin('胶囊')">
					<view class="margin-right20">
						<image class="img-44" v-if="yaopin == '胶囊'" src="../../../../static/image/checked.png" mode=""></image>
						<image class="img-44" v-else src="../../../../static/image/check.png" mode=""></image>
					</view>
					<view class="fontSize-15 color-000">胶囊</view>
				</view>
				<view class="flex-alignItems-center margin-right20" @click="chooseYaoPin('药片')">
					<view class="margin-right20">
						<image class="img-44" v-if="yaopin == '药片'" src="../../../../static/image/checked.png" mode=""></image>
						<image class="img-44" v-else src="../../../../static/image/check.png" mode=""></image>
					</view>
					<view class="fontSize-15 color-000">药片</view>
				</view>
				<view class="flex-alignItems-center margin-right20" @click="chooseYaoPin('液体')">
					<view class="margin-right20">
						<image class="img-44" v-if="yaopin == '液体'" src="../../../../static/image/checked.png" mode=""></image>
						<image class="img-44" v-else src="../../../../static/image/check.png" mode=""></image>
					</view>
					<view class="fontSize-15 color-000">液体</view>
				</view>
				<view class="flex-alignItems-center" @click="chooseYaoPin('注射')">
					<view class="margin-right20">
						<image class="img-44" v-if="yaopin == '注射'" src="../../../../static/image/checked.png" mode=""></image>
						<image class="img-44" v-else src="../../../../static/image/check.png" mode=""></image>
					</view>
					<view class="fontSize-15 color-000">注射</view>
				</view>
			</view>
		</view>
		
		<!-- 底部操作栏 -->
		<view style="height: 200rpx;"></view>
		<view class="position-fixed-bottom padding-30 bg-fff">
			<view class="btn50-0165FD-15ffffff flex-center" @click="SubmitEvent">
				保存
			</view>
		</view>
	</view>
</template>

<script>
	import { mapMutations } from 'vuex'
	export default {
		data(){
			return{
				koufu:'口服',
				yaopin:'胶囊',
				yongliangdanwei:'',
				yaopinyongliang:''
			}
		},
		onShow() {
			// if( this.$store.state.qualifications.form){
			// 	let item = {}
			// 	item =  this.$store.state.qualifications.form
			// 	this.koufu = item.koufu
			// }
		},
		methods:{
			...mapMutations(['formItem']),
			SubmitEvent(){
				let form = {
					koufu: this.koufu,
					yaopin:this.yaopin,
					yongliangdanwei:this.yongliangdanwei,
					yaopinyongliang:this.yaopinyongliang
				}
				this.formItem(form)
				this.$tools.navigateBack()
			},
			chooseUseMedication(value){
				this.koufu = value
			},
			chooseYaoPin(value){
				this.yaopin = value
			}
		}
	}
</script>

<style lang="scss" scoped>
	
</style>